#ifndef SCERESPONDMANAGER_H_
#define SCERESPONDMANAGER_H_

#include <e32base.h>
#include "iscerespondobserver.h"

class SceRespondManager
	{
private:
    struct RespondItem
    {
        TBuf<50> 	codingType;
        HBufC8* 	data;
        int 		id;
        int 		ncmd;

        ~RespondItem()
        {
        	delete data;
        	data = NULL;
        }
    }

private:
	static SceRespondManager* 			soleInstance;
	RPointerArray<ISceRespondObserver>	listObserver;
	RPointerArray<RespondItem>			listRespond;
	
public:
    ~SceRespondManager();
    
private:
	SceRespondManager();
	
public:
	static SceRespondManager& GetInstance();
	RespondItem* GetRespond() const;
	
private:
	void AddRespond(int id, int nCmd, const TDesC8& arrayOfByte, const TDesC8& string);
	void DoOnData(const RespondItem& respond);
	
public:
	void RegisterObserver(ISceRespondObserver& iSceRespondObserver);
	void UnregisterObserver(ISceRespondObserver& iSceRespondObserver);
	};

#endif /* SCERESPONDMANAGER_H_ */
